from django.contrib import admin
from app01.models import Article

# Register your models here.
class ArticleAadmin(admin.ModelAdmin):
    # 配置展示列表
    list_display = ('id', 'title', 'content')
    # 配置点击id和title和content，执行跳转
    list_display_links = ('id', 'title', 'content')
    # 配置过滤字段
    list_filter = ('title', 'id')
    # 配置搜索信息
    search_fields = ('title',)
    # 新增，只读属性
    readonly_fields = ('id',)

admin.site.register(Article, ArticleAadmin)